/*
 * @Author: linzaifei 1609781601@qq.com
 * @Date: 2025-07-23 15:09:32
 * @LastEditors: linzaifei 1609781601@qq.com
 * @LastEditTime: 2025-08-07 09:07:32
 * @FilePath: /amap-web-vr/src/views/home/control/vc-vr-zuji-control/useVisiable.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import * as Cesium from 'cesium'

export const useVisiable = () => {
    
    const visible = (viewer:Cesium.Viewer,visible: boolean) => {
        let element = viewer.container as HTMLElement;
        console.log("----", element.children);
        for (let index = 0; index < element.children.length; index++) {
            const element1 = element.children[index];
            if (
            element1.className.includes("cesium") ||
            element1.className.includes("el-menu") ||
            element1.className.includes("vc-layer-imagery")
            ) {
            continue;
            }
            (element1 as HTMLElement).style.display = visible ? "block" : "none";
        }
    }
    return {
        visible
    }

}